/*
 * Amazon Software Tecnologia
 * http://www.amazon-software.net
 */
package tv.pojo;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import java.io.Serializable;

import java.util.ArrayList;
import java.util.List;


/**
 * DOCUMENT ME!
 *
 * @author $Author$
 * @version $Revision$
 */
@Entity
@Table(name = "celulares")
public class Celular implements Serializable
{
   @OneToMany(mappedBy = "celular", fetch = FetchType.LAZY)
   @Cascade(CascadeType.ALL)
   private List<Compra> compras = new ArrayList<Compra>(0);
   @Id
   @GeneratedValue(strategy = GenerationType.AUTO)
   @Column(name = "cod_celular")
   private Long codCelular;
   @Column(name = "des_celular")
   private String descricao;

   /**
    * DOCUMENT ME!
    *
    * @return
    */
   public Long getCodCelular()
   {
      return codCelular;
   }

   /**
    * DOCUMENT ME!
    *
    * @return
    */
   public List<Compra> getCompras()
   {
      return compras;
   }

   /**
    * DOCUMENT ME!
    *
    * @return
    */
   public String getDescricao()
   {
      return descricao;
   }

   /**
    * DOCUMENT ME!
    *
    * @param codCelular
    */
   public void setCodCelular(Long codCelular)
   {
      this.codCelular = codCelular;
   }

   /**
    * DOCUMENT ME!
    *
    * @param compras
    */
   public void setCompras(List<Compra> compras)
   {
      this.compras = compras;
   }

   /**
    * DOCUMENT ME!
    *
    * @param descricao
    */
   public void setDescricao(String descricao)
   {
      this.descricao = descricao;
   }
}
